package com.cjj.eatlasflow.mapper;

import com.cjj.eatlasflow.model.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

/**
* @author 54226
* @description 针对表【t_goods(商品表)】的数据库操作Mapper
* @createDate 2025-02-19 12:31:04
* @Entity com.cjj.eatlasflow.model.Goods
*/
public interface GoodsMapper extends BaseMapper<Goods> {

    /**
     * 保存Goods
     *
     * @param goods
     */
    void save(@Param("goods") Goods goods);

    /**
     * 根据GoodsId删除Goods
     *
     * @param goodsId
     */
    void deleteById(@Param("goodsId") Long goodsId);

    /**
     * 更新Goods
     *
     * @param goods
     */
    void update(@Param("goods") Goods goods);

    /**
     * 根据GoodsId查询Goods
     *
     * @param goodsId
     * @return Goods
     */
    Goods getGoodsById(@Param("goodsId") Long goodsId);

    /**
     * 根据GoodsId查询Goods
     *
     * @param goodsNum
     * @return Goods
     */
    Goods getGoodsByNum(@Param("goodsNum") String goodsNum);

    ArrayList<Goods> getGoodsList(@Param("offset") Integer offset, @Param("limit") Integer limit);
}




